1. Field
The present specification relates to a memory management apparatus including a non-volatile memory for which writing is performed in units of blocks such as a portable terminal apparatus including a NAND memory, and a memory management method.
2. Description of the Related Art
A portable terminal apparatus (hereinafter, also simply referred to as a “portable terminal”) including a cellular phone terminals and the like uses a flash memory as a rewritable non-volatile semiconductor memory. A flash memory is classified into a NAND type and a NOR type. The NAND type flash memory (hereinafter, also referred to as a “NAND memory”) is suitable for large capacity and the cost per unit of capacity is low, but only a read/write operation can be performed in units of blocks of a predetermined size and random access is slow. Meanwhile, the NOR type flash memory is suitable for a high speed read operation and high speed random access, but it is not suitable for high integration and a large amount of current is necessary for writing.
The NAND memory, which is advantageous in terms of cost, high integration, power consumption and the like, may be selected as a memory provided in a portable terminal. The uses of the NAND memory are classified into two: storage of codes (programs) and storage of user data. However, it is normal for the NAND memory to already include bad blocks by the time of shipment. Furthermore, it is necessary to consider that the deterioration of the NAND memory occurs as time passes and a block with good quality at an early stage may become defective.
In this regard, in consideration of the characteristics of the NAND memory in which writing is performed in units of blocks, several BBM (Bad Block Management) methods have been proposed. The bad block management (hereinafter, also simply referred to as a “BBM”) represents logic in which a bad block is detected and managed after data writing, erasing and the like in a non-volatile memory in which writing is performed in units of blocks. One of the BBM methods is a memory management method disclosed in Japanese Unexamined Patent Application Publication No 2008-40701 filed by the applicant of the present invention.
Japanese Unexamined Patent Application Publication No 2008-40701 discloses a memory management method which is suitable for software update using a differential file with respect to a non-volatile memory in which writing is performed in units of blocks. According to the memory management method, a plurality of blocks of the non-volatile memory may be classified as a “management area”, a “code area”, a “replacement area” and an “interference area” and the interference area is disposed between the management area and the replacement area. With such a configuration, the replacement area can be used in common by both the management area and the code area. Furthermore, the management area is provided in the non-volatile memory itself, whereby it is possible to perform replacement management of a bad block without providing a special external memory management unit.
As described above, since existing approaches for bad block management define a memory area for simply assisting the BBM, other memory areas except for the memory area are out of the management range of the BBM.
More accurately, a code (program) area allocated to the NAND memory demands the BBM. For example, the file system performs its own BBM as one function provided therein. Therefore, when the BBM is applied to the NAND memory, since a collision in memory management may occur between the original BBM and the BBM of the file system itself, the execution of a complicated BBM is necessary.
It is desirable to avoid a collision between a BBM performed out of a file system and a BBM performed as one function of the file system in a non-volatile memory in which writing is performed in units of blocks, and the BBM can be applied throughout a wide range of the non-volatile memory.